package cn.edu.xaut.mybatisers.mall.Service;

import cn.edu.xaut.mybatisers.mall.Entity.Consumer;
import cn.edu.xaut.mybatisers.mall.Exception.ExceptionEntity.LoginException;
import cn.edu.xaut.mybatisers.mall.Exception.ExceptionEntity.NotMemberException;
import cn.edu.xaut.mybatisers.mall.Exception.ExceptionEntity.ParametersIncompleteException;
import cn.edu.xaut.mybatisers.mall.Exception.ExceptionEntity.TeleNumberExistException;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.apache.ibatis.jdbc.SQL;
import org.springframework.http.HttpRequest;
import org.springframework.mail.MailException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.sql.SQLException;
import java.sql.SQLIntegrityConstraintViolationException;

public interface RegisterService {
    boolean normalConsumer(Consumer consumer, String verifyCode, HttpSession session) throws SQLException, TeleNumberExistException, LoginException;
    boolean memberConsumer(Consumer consumer) throws SQLException;
    boolean modifyInfo(Consumer consumer) throws SQLException;
    Consumer modifyPassword(Consumer consumer, String newPassword, String verifyCode, HttpSession session) throws SQLException, LoginException;
    Boolean sendVerifyCode(Consumer consumer, HttpServletRequest request, HttpSession session) throws SQLException, MailException, NotMemberException, LoginException, ParametersIncompleteException;
    Boolean authenticMember(Consumer consumer) throws SQLException;
    Consumer getInfoById(Consumer consumer) throws SQLException;
}
